<template>
    <h3>HOME组件</h3>
    <router-link :to="{name:'mov',params:{id:3}}">GO TO MOVIE</router-link>
    <button @click="gotoMovie(3)">go to movie</button>
</template>

<script>
export default{
    name:'MyHome',
    methods:{
        gotoMovie(id){
            this.$router.push({name:'mov',params:{id:3}})
        }
    }
}
</script>


<style>

</style>